package com.ourteam.product.ui.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-14 15:16:21 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductUITreeNodeBuilderBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.ui.dao.ProductUITreeNodeBuilder productUITreeNodeBuilder;

  protected BeanMap getBeanMap() {

    return new BeanMap(productUITreeNodeBuilder);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.ui.dao.IProductUITreeNodeBuilderDAO.Id);

    mappedDaoFields.put("nodeId", com.ourteam.product.ui.dao.IProductUITreeNodeBuilderDAO.NodeId);

    mappedDaoFields.put("code", com.ourteam.product.ui.dao.IProductUITreeNodeBuilderDAO.Code);

    mappedDaoFields.put(
        "nodeBuilder", com.ourteam.product.ui.dao.IProductUITreeNodeBuilderDAO.NodeBuilder);

    mappedDaoFields.put("status", com.ourteam.product.ui.dao.IProductUITreeNodeBuilderDAO.Status);

    mappedDaoFields.put("remarks", com.ourteam.product.ui.dao.IProductUITreeNodeBuilderDAO.Remarks);

    mappedDaoFields.put(
        "sortIndex", com.ourteam.product.ui.dao.IProductUITreeNodeBuilderDAO.SortIndex);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductUITreeNodeBuilderBean() {
    super();

    this.productUITreeNodeBuilder = new com.ourteam.product.ui.dao.ProductUITreeNodeBuilder();
  }

  public ProductUITreeNodeBuilderBean(
      com.ourteam.product.ui.dao.ProductUITreeNodeBuilder productUITreeNodeBuilder) {
    super();

    this.productUITreeNodeBuilder = productUITreeNodeBuilder;
  }

  public com.ourteam.product.ui.dao.ProductUITreeNodeBuilder convertToProductUITreeNodeBuilder() {
    return this.productUITreeNodeBuilder;
  }

  public com.ourteam.product.ui.dao.ProductUITreeNodeBuilder convertTo() {
    return this.productUITreeNodeBuilder;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productUITreeNodeBuilder.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productUITreeNodeBuilder.setId(id);
  }

  /**
   * Get nodeId
   *
   * @return long
   */
  public long getNodeId() {
    return (long) this.productUITreeNodeBuilder.getNodeId();
  }

  /**
   * Set nodeId
   *
   * @parameter long
   */
  public void setNodeId(long nodeId) {

    this.productUITreeNodeBuilder.setNodeId(nodeId);
  }

  /**
   * Get code
   *
   * @return String
   */
  public String getCode() {
    return (String) this.productUITreeNodeBuilder.getCode();
  }

  /**
   * Set code
   *
   * @parameter String
   */
  public void setCode(String code) {

    this.productUITreeNodeBuilder.setCode(code);
  }

  /**
   * Get nodeBuilder
   *
   * @return String
   */
  public String getNodeBuilder() {
    return (String) this.productUITreeNodeBuilder.getNodeBuilder();
  }

  /**
   * Set nodeBuilder
   *
   * @parameter String
   */
  public void setNodeBuilder(String nodeBuilder) {

    this.productUITreeNodeBuilder.setNodeBuilder(nodeBuilder);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productUITreeNodeBuilder.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productUITreeNodeBuilder.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productUITreeNodeBuilder.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productUITreeNodeBuilder.setRemarks(remarks);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productUITreeNodeBuilder.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productUITreeNodeBuilder.setSortIndex(sortIndex);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductUITreeNodeBuilderBean) == false) {
      return false;
    } // end if

    ProductUITreeNodeBuilderBean other = (ProductUITreeNodeBuilderBean) obj;

    boolean isEqual = false;

    com.ourteam.product.ui.dao.ProductUITreeNodeBuilder tempProductUITreeNodeBuilder =
        other.convertToProductUITreeNodeBuilder();

    if (tempProductUITreeNodeBuilder == null || this.productUITreeNodeBuilder == null) {
      isEqual = false;
    } else if (tempProductUITreeNodeBuilder == this.productUITreeNodeBuilder
        || tempProductUITreeNodeBuilder.equals(this.productUITreeNodeBuilder)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductUITreeNodeBuilderBean[] toArray(
      com.ourteam.product.ui.dao.ProductUITreeNodeBuilder[] aProductUITreeNodeBuilders) {

    return toArray(aProductUITreeNodeBuilders, null);
  }

  public static ProductUITreeNodeBuilderBean[] toArray(
      com.ourteam.product.ui.dao.ProductUITreeNodeBuilder[] aProductUITreeNodeBuilders,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductUITreeNodeBuilders)) {
      return new ProductUITreeNodeBuilderBean[0];
    }

    int length = aProductUITreeNodeBuilders.length;

    ProductUITreeNodeBuilderBean[] beans = new ProductUITreeNodeBuilderBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductUITreeNodeBuilderBean(aProductUITreeNodeBuilders[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductUITreeNodeBuilders[i]});
      }
    }

    return beans;
  }
}
